package com.cgt.xiaotao.product.client;

import com.cgt.common.utils.R;
import com.cgt.xiaotao.product.client.domain.dto.Product;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Repository;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(value = "service-product")
@Repository
public interface ProductFeignClient {
    /**
     * 根据商品id删除购物车
     */
    @DeleteMapping("/cart/delete/{productId}")
    R<String> deleteCart(@PathVariable Long productId);

    @GetMapping("/products/detail")
    Product getProductById(@RequestParam Long id);
}
